package com.ruoyi.base.domain;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 课程对象 base_course
 * 
 * @author yepanpan
 * @date 2020-11-09
 */
@ApiModel("课程实体")
@Getter
@Setter
public class BaseCourse extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 自增长主键ID */
    private Long id;

    /** 开设部门 */
    @ApiModelProperty("开设部门ID")
    @NotNull(message="开设部门不能为空")
    private Long deptId;

    @Excel(name = "开设部门", prompt = "必填项")
    @ApiModelProperty("开设部门")
    private String deptName;
    
    /** 课程名称 */
    @Excel(name = "课程名称", prompt = "必填项")
    @ApiModelProperty("课程名称")
    @NotBlank(message="课程名称不能为空")
    private String title;

    /** 课程代码 */
    @Excel(name = "课程代码", prompt = "必填项")
    @ApiModelProperty("课程代码")
    @NotBlank(message="课程代码不能为空")
    private String code;

    /** 简称 */
    @Excel(name = "简称", prompt = "必填项")
    @ApiModelProperty("简称")
    @NotBlank(message="课程简称不能为空")
    private String sname;

    /** 课程类型 1=公共基础课	2=专业基础课	3=专业技能课	4=选修课 */
    @Excel(name = "课程类型",dictType = "course_type", combo = {"公共基础课","专业基础课","专业技能课","选修课"})
    @ApiModelProperty("课程类型")
    @NotBlank(message="课程类型不能为空")
    private String type;

    /** 学分 */
    @Excel(name = "学分")
    @ApiModelProperty("学分")
    private Integer credit;

    /** 状态 */
    @Excel(name = "状态", dictType = "common_status", combo = {"启用","禁用"})
    @ApiModelProperty("状态")
    @NotBlank(message="状态不能为空")
    private String status;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("deptId", getDeptId())
            .append("deptName", getDeptName())
            .append("title", getTitle())
            .append("code", getCode())
            .append("sname", getSname())
            .append("type", getType())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("credit", getCredit())
            .append("status", getStatus())
            .toString();
    }
    
}
